package com.frogs.ucenter.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.frogs.framework.util.PageList;

public interface TaskService {

	/**
	 * 获取主线列表
	 * 
	 * @param userId
	 * @param verify
	 * @param status
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public PageList<Map<String, Object>> getTotalFlowList(Integer userId, Integer status, 
			Integer pageNo, Integer pageSize) throws Exception;

	/**
	 * 获取子线列表
	 * 
	 * @param totalFlowId
	 * @param userId
	 * @param verify
	 * @param status
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public PageList<Map<String, Object>> getSubFlowList(Integer totalFlowId, Integer userId,
			Integer status, Integer pageNo, Integer pageSize) throws Exception;

	/**
	 * 获取任务列表
	 * 
	 * @param subFlowId
	 * @param userId
	 * @param verify
	 * @param status
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public JSONObject getFlowTaskInfoList(Integer subFlowId,
			Integer userId, Integer pageNo, Integer pageSize) throws Exception;

	/**
	 * 开始任务
	 * 
	 * @param userId
	 * @param totalFlowId
	 * @return
	 * @throws Exception
	 */
	public JSONObject startTask(Integer userId, Integer totalFlowId, Integer levelId) throws Exception;

	/**
	 * 完成任务
	 * 
	 * @param userId
	 * @param verify
	 * @param taskCompleteInfoId
	 * @param taskType
	 * @param taskInfoId
	 * @return
	 * @throws Exception
	 */
	public JSONObject completeTask(Integer userId, Integer taskCompleteInfoId, 
			Integer taskType, Integer taskInfoId) throws Exception;

	/**
	 * 获取常规任务
	 * 
	 * @param verify
	 * @param userId
	 * @param levelId
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public PageList<Map<String, Object>> getPointTaskInfoList(Integer userId, Integer levelId, Integer pageNo, Integer pageSize)
			throws Exception;

	/**
	 * 获取常规任务进度列表
	 * 
	 * @param taskId
	 * @param verify
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> getPointTaskInfoProgressList(Integer taskId,
			Integer userId) throws Exception;

	/**
	 * 主线任务完成率
	 * 
	 * @param userId
	 * @param verify
	 * @return
	 * @throws Exception
	 */
	public JSONObject taskCompleteRate(Integer userId, Integer level) throws Exception;
	/**
	 * 获取主线任务
	 * 
	 * @param userId
	 * @param verify
	 * @param taskId
	 * @return
	 * @throws Exception
	 */
	public JSONObject getTask(Integer userId, Integer taskId) throws Exception;
}
